
function itstock_search(page_i, ajax_elm, post){
  if(ajax_elm === undefined) {
    var value = encodeURIComponent(E('search').value);
    if (regex_text.test(value)) {
        window.location.search = RG('search', RG('idx'));
        return;
    }
    window.location.search = http_GET('search', value, RG('idx'));
  } else {
    var value = encodeURIComponent(E('search_ajax').value);
    var search = '';
    if (!regex_text.test(value)) {
      search = '&search=' + value;
    }
    itstock_request_popup(page_i + search, post, 0, 0, false, itstock_lightbox_get_id(ajax_elm));
  }
}
